﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace _013_014_015_016_表达式_语句详解_16_2_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //int counter = 0;
            //while (counter < 10)
            //{
            //    Console.WriteLine("Hello world");
            //    counter++;
            //}
            int i = 0;

            for (; i < 10; i++)
            {
                Console.WriteLine("hello World");
            }

            //for (; ; )
            //{
            //    Console.WriteLine("666");
            //}

            //for (int a = 1; a < 10; a++) {
            //    for (int b = 1; b <= a; b++)
            //    {
            //        Console.Write("{0}*{1}={2}\t",b,a,a*b); 
            //    }
            //    Console.Write("\n");
            //}

            int[] array = new int[]{ 1,2,3,4,5,6};
            //Console.WriteLine(array is Array);
            //IEnumerator enumerator = array.GetEnumerator();
            //while (enumerator.MoveNext())
            //{
            //    Console.WriteLine(enumerator.Current);
            //}
            //enumerator.Reset();
            //while (enumerator.MoveNext())
            //{
            //    Console.WriteLine(enumerator.Current);
            //}

            //foreach简记
            foreach (var item in array)
            {
                Console.WriteLine(item);
            }
        }
    }
}
